﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manager_Dondathang_Controls_UC_Dagiaohang : System.Web.UI.UserControl
{
    BUS_Order Ord = new BUS_Order();
    BUS_PayMethod pay = new BUS_PayMethod();
    protected void Page_Load(object sender, EventArgs e)
    {
        gvDdhChuaxuly.DataSource = Ord.Order_GetByTop(0, "[Check] = 1 and Finish = 1", "Date DESC");
        gvDdhChuaxuly.DataBind();
        Page.Title = "Đơn đặt hàng đã giao hàng";
    }
    public string KhachHang(string ID)
    {
        BUS_Customers data = new BUS_Customers();
        return data.Customers_GetByID(ID).Rows[0]["UserName"].ToString(); ;
    }
    public string Phuongthuc(string id)
    {
        return pay.PayMethod_GetByID(id).Rows[0]["Name"].ToString();
    }
}